home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: seebs@solutions.solon.com (Peter Seebach)
- Newsgroups: comp.lang.c
- Subject: Re: is getopt() ANSI and portable ?
- Date: 21 Mar 1996 08:54:36 -0600
- Organization: Usenet Fact Police (Undercover)
- Message-ID: <4irqjc$c2q@solutions.solon.com>
- References: <31512EC7.389F@eso.org>
- NNTP-Posting-Host: solutions.solon.com
-
- In article <31512EC7.389F@eso.org>, Nicolas Devillard <nDevil@eso.org> wrote:
- >I do not want to reinvent the wheel by creating again my own
- >command line parser. I found this getopt() function being part
- >of stdlib, but I'd like to know:
-
- >1. If it is part of the ANSI C stdlib ?
-
- No.
-
- >2. If it is a portable call ? I cannot find it in the POSIX prog guide.
-
- Not very. It's widely available, but I don't think it's very standardized.
- POSIX may actually specify it now. Not sure.
-
- I wrote a portable implementation of this (it curretly uses getpwuid,
- but this can be elided with no trouble), which is really quite a bit different,
- but is mostly usage-compatible. There's also something called "parseargs",
- which is a bit more Unix specific, but I'm not sure where you'd get it.
-
- -s
- --
- Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
- C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
- FUCK the communications decency act. Goddamned government. [literally.]
- The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
-